package pri.zey.custom.activity;/**
 * Created by Administrator on 2016/3/12.
 */

import android.os.Handler;
import android.os.Message;
import android.support.v4.app.Fragment;

import pri.zey.custom.activity.Interfaces.IBase;

/**
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>类描述
 * fragment基础类
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>属性描述
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>方法描述
 */
public class FragmentBase extends Fragment implements IBase<Fragment> {

    public static final int KEY_FMSGWHATE = 0x1001;
    private FragmentBase mFragment;
    private String mFragmentName;
    private Message mMsg;
    private Handler mFHandler = new Handler(){
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            switch (msg.what){
                case KEY_FMSGWHATE:
                    setMsg(msg);
                    break;
                default:break;
            }
        }
    };

    @Override
    public Message getMsg() {
        return mMsg;
    }

    @Override
    public void setMsg(Message mMsg) {
        this.mMsg = mMsg;
    }

    @Override
    public Fragment getThis() {
        mFragment = this;
        return mFragment;
    }

    @Override
    public String getThisName() {
        this.mFragmentName = this.getClass().getName();
        return mFragmentName;
    }
}
